package com.zx.flow.api.listener;

import com.zx.flow.api.listener.request.FlowContext4Listener;
import com.zx.flow.api.listener.request.FlowNode4Listener;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@Schema(title = "客户端监听流程事件", description = "客户端监听流程事件")
public class FlowEvent {

    @Schema(description = "完成的流程上下文对象")
    @NotNull(message = "流程不能为null")
    private FlowContext4Listener flowContext;

    @Schema(description = "完成的流程上下文对象")
    private FlowNode4Listener flowNode;

    @Schema(description = "触发的事件，包括节点状态变更、流程状态变更、流程开始结束、节点同意&驳回等")
    @NotNull(message = "事件流程不能为null")
    private String eventCode;
}
